#!/usr/local/bin/python3.2
import urllib
from urllib import request
import io,os,sys
import json
from json import JSONEncoder

url  =  "http://mil.news.sina.com.cn/2012-10-01/0801702582.html"
req = urllib.request.Request(url)
f = urllib.request.urlopen(req)
s = f.read()
#print type(s)
s = s.decode('gbk','ignore') #.encode('utf-8')
#sys.out(s)
#print repr(s)
mdir = 'c:/wamp/apps/hiker/img/'
#s = json.dumps(s.encode('utf-8'))
fl = open(mdir+'0801702582.html','w',1,'gbk')
fl.write(repr(s))
fl.close()
